import React, { memo } from "react"
import RecommentCard from "../../components/home/recommentArea/recommentCard.tsx";
import { useAppSelector } from "../../redux/index.ts";

const RecommentArea:React.FC=memo(()=>{

// 从仓库中获取书籍信息
const bookInfo = useAppSelector(state=>state.book.bookInfo);

    return (
        <div className="w-full min-h-96 bg-lime-200">
            <div className="w-full h-20 text-white bg-stone-300 text-center py-4 text-3xl">猜你喜欢</div>
            <div className="w-full min-h-60 px-6">
                <ul>
                    {
                        bookInfo.map((item,index)=>{
                            return <RecommentCard key={index} bookInfo={item}/>
                        })
                    }
                </ul>
            </div>
        </div>
    )
})

export default RecommentArea;